package cn.xuewenbao.edu.controller;


import cn.xuewenbao.edu.service.CourseChapterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author mafayu
 * @since 2021-04-07
 */
@RestController
@RequestMapping("/edu/course-chapter")
@Slf4j
@Api(tags = "课程章节表")
public class CourseChapterController {

    @Autowired
    private CourseChapterService chapterService;

    //根据章节id删除课程章节
    @ApiOperation(value = "根据章节id删除课程章节")
    @DeleteMapping("deleteChapter/{chapterId}")
    public Result<?> deleteChapter(@PathVariable String chapterId) {
        Result<?> result = chapterService.deleteChapter(chapterId);
        return result;
    }


}

